<?php

class welcome extends Controller
{
	public function index ()
	{
		$this->session();
		$orgs = new organization();
		$public = $orgs->getPublicOrgs();
		foreach( $public as $org ) {
			$org_id = $org['org_id'];	
			$orgboxes[$org_id]['logo'] = $org['logo'];
			$orgboxes[$org_id]['name'] = $org['name'];
			$orgboxes[$org_id]['description'] = $org['description'];
			$orgboxes[$org_id]['long_description'] = $org['long_description'];
			$orgboxes[$org_id]['org_id'] = $org_id;
		}
		$content = new BufferedView('public/org', array( 'orgboxes' => $orgboxes, 'nonote' => true) );
		new View('template', 
			array(
				'title' => 'FEELS',
				'heading' => 'Welcome to <span style="font-variant:normal;">F.E.E.L.S.</span>',
				'globalnav' => new BufferedView('org/globalnav'),
				'content' => $content
			)
		);	
	
	}
}
